import { Component } from "react";
import store from '../store'
export default class CounterDemo extends Component {

    render() {
        let state = store.getState()
        let { num } = state
        console.log(state);
        return (
            <div>
                <button onClick={() => store.dispatch({ type: 'numAdd' })}>{num}</button>
            </div>
        )
    }
}